﻿namespace Magic.Core;

/// <summary>
/// 设置依赖注入方式
/// </summary>
[AttributeUsage(AttributeTargets.Class)]
public class InjectionAttribute : Attribute
{
    public ServiceLifeTime LifeTime { get; set; }
    public InjectionAttribute()
    {
        LifeTime = ServiceLifeTime.Transient;
    }
    public InjectionAttribute(ServiceLifeTime lifeTime)
    {
        LifeTime = lifeTime;
    }
}
